// Package handler
// @Author: zhangdi
// @File: HandlerReslut
// @Version: 1.0.0
// @Date: 2023/7/3 18:23
package handler

import (
	"fmt"
	"ideatools/application/constant/enums"
	"ideatools/application/core/toast"
	"ideatools/application/db/dbdto"
	"ideatools/application/pkgs/clips"
	"ideatools/application/pkgs/mylog"
	"ideatools/application/pkgs/syst"
)

func completeHandler(conpleteDo string, dialogId uint, sendResult *dbdto.ChatContentInfo) {

	NotifyFrontMessageContent(sendResult, nil)
	mylog.Debug("conpleteDo:" + conpleteDo)
	switch conpleteDo {
	case enums.CompleteDoUrl:
		//syst.
		syst.OpenBrowser(sendResult.Content)
		//toast.SysInfo(fmt.Sprintf("正在打开网址", setting.ProjectName), fmt.Sprintf("%s", text))
		break
	case enums.CompleteDoShow:

		break
	case enums.CompleteDoCopyAndParse:
		mylog.Debug("复制并粘贴")
		clips.SetText(sendResult.Content)
		clips.Parse()
		break
	default:
		toast.SysInfo(fmt.Sprintf("【%s】--处理结果已经复制到剪切板 IdeaTools"), fmt.Sprintf("%s", sendResult.Content))
		clips.SetText(sendResult.Content)
		break
	}
}
